<div class="path">
    <i class="iconfont icon-shouye1"></i>
    <a href="{url('admin/default/welcome')}">开始</a> / 
    <a href="{url('service/index')}">维修任务</a>
</div>
<div class="table-head fn-clear">
    <div class="fn-l">
        <a href="{url('service/edit',array('id'=>$id))}" class="button">
            <i class="iconfont icon-xiangzuo1"></i> 返回
        </a>
    </div>
</div>
<div class="m10">
<form id="form" action="{url('service/bom')}">
<input type="hidden" name="id" value="{$id}"/>   
<input type="hidden" name="old_imei" value="{$info['imei']}"/>  
<input type="hidden" name="manufacturer_name" value="{$info['manufacturer_name']}"/>  
<input type="hidden" name="producttype_name" value="{$info['producttype_name']}"/>  
<input type="hidden" name="unicom_name" value="{$info['unicom_name']}"/>  
<table class="table table-border">
    <tr class="bg-f5">
      <th>跟踪号:</th>
      <td>{$info['number']}</td>
      <th>IMEI号:</th>
      <td>{$info['imei']}</td>
    </tr>
    <tr class="bg-f5">
      <th>厂商:</th>
      <td>{$info['manufacturer_name']}</td>
      <th>机型:</th>
      <td>{$info['producttype_name']}</td>
    </tr>
    <tr class="bg-f5">
      <th>购买日期:</th>
      <td>{if $info['shop_time']}{date('Y-m-d',$info['shop_time'])}{/if}</td>
      <th>维修工程师:</th>
      <td>{$userInfo['username']}</td>
    </tr>
    <tr class="bg-f5">
      <th>是否保内:</th>
      <td>{if $info['overtime'] == '是'}<span class="badge">保内</span>{else}<span class="badge bg-red">过保</span>{/if}</td>
      <th>是否紧急:</th>
      <td>{if $info['is_urgent']}<span class="badge bg-red">加急</span>{else}<span class="badge">普通</span>{/if}</td>
    </tr>
    <tr class="bg-f5">
      <th>客户描述故障:</th>
      <td>{$info['fault_why']}</td>
      <th>是否重复维修:</th>
      <td class="is_repeat"></td>
    </tr>  
    <tr>
      <th>检查实际故障:</th>
      <td colspan="3">{$info['failure_cause']}</td>
    </tr>
    <tr>
      <th>故障级别:</th>
      <td colspan="3">
<select class="select" name="fault_level" datatype="*">
    <option value="" {if !$info['fault_level']} selected="selected"{/if}></option>
    <option value="L0" {if $info['fault_level'] =='L0'} selected="selected"{/if}>L0</option>
    <option value="L1" {if $info['fault_level'] =='L1'} selected="selected"{/if}>L1</option>
    <option value="L1+" {if $info['fault_level'] =='L1+'} selected="selected"{/if}>L1+</option>
    <option value="L2" {if $info['fault_level'] =='L2'} selected="selected"{/if}>L2</option>
</select>
      </td>
    </tr>
    <tr>
      <th>故障类型:</th>
      <td colspan="3">
{loop $faulttype_lists $rs}
            <table class="table">
                <tr>
                    <td class="w200 fn-tar bg-f5 fn-f14">{htmlspecialchars_decode($rs['about'])}</td>
                    <td>
{loop $rs['list'] $k $vo}
    <input type="checkbox" name="faulttype[{$rs['id']}][]" value="{$vo['id']}" {if in_array($vo['id'],$faulttype_id)}checked{/if} /> {htmlspecialchars_decode($vo['about'])}&nbsp;&nbsp;&nbsp;&nbsp;
{/loop}
                    </td>
                </tr>
            </table> 
 {/loop} 
      </td>
    </tr>
    <tr>
      <th>是否换新机:</th>
      <td colspan="3">
 是 <input name="is_news_phone" type="radio" value="1" />&nbsp;&nbsp;
 否 <input name="is_news_phone" type="radio" value="0" checked="checked" />   
      </td>
    </tr>
    <tr class="is_new">
      <th>新机IMEI号:</th>
      <td colspan="3"><input class="input w200" type="text" name="new_imei" value="" /> <span class="gray">未更换,请直接填写旧的IMEI</span></td>
    </tr>  
</table>
<div class="btn fn-tac">
    <input type="submit" value="确认提交维修单" class="button" />
    <a href="{url('service/edit',array('id'=>$id))}" class="button button-yellow">
          <i class="iconfont icon-xiangzuo1"></i> 返回
    </a>
</div>
</form>
<script type="text/javascript">
Do('base','form','date','dialog',function(){ 
    $('#form').forms();
    $(".is_new").hide();
    $("input[name=is_news_phone]").click(function(){
        var value = $(this).val();
        if(value == 0){
          $(".is_new").hide();
        }else{
          $(".is_new").show();
        }
    });
  $.post("{url('repair/diacrisis/is_repeat')}",{imei:"{$info['imei']}"},function(data){
      $('.is_repeat').html(data);
  },'html');
})
</script>